import { api } from '../boot/axios'

export const uploadApi = {
  uploadFile(file, folder) {
    const formData = new FormData()
    formData.append('file', file)
    formData.append('folder', folder)
    
    return api({
      url: '/api/base/upload',
      method: 'post',
      data: formData,
      headers: {
        'Content-Type': 'multipart/form-data'
      }
    })
  }
}

export default uploadApi